Fix unsafe rawPointer access in cloneMultiple#55613
Fix unsafe rawPointer access in cloneMultiple#55613bartlomiejbloniarz wants to merge 1 commit intomainfrom
Conversation
|
@bartlomiejbloniarz has exported this pull request. If you are a Meta employee, you can view the originating Diff in D93596770. |
Summary: The cloneMultiple method was written in a way to accept a list of families that are presumed to be owned by the api caller. This designe was mostly aimed at reanimated, that holds refernces to ShadowNodes (that own these families). In the case of AnimationBackend this didn't work properly, as when the view is unmounted we would lose the ShadowNodeFamily shared_ptr that we hold and it could get deallocated. Since now we can get an owning reference to ShadowNodeFamily from ShadowNode::getFamilyShared, we don't have to keep this old unsafe api. Instead we require the caller to have an owning reference with the api itself. This `cloneMultiple` method isn't really adopted in the community, so the breaking change shouldn't be a big problem. Reviewed By: zeyap, javache Differential Revision: D93596770
5ecac9d to
37d37ce
Compare
Job Summary for GradleTest All :: build_android
|
Summary: Pull Request resolved: #55613 The cloneMultiple method was written in a way to accept a list of families that are presumed to be owned by the api caller. This designe was mostly aimed at reanimated, that holds refernces to ShadowNodes (that own these families). In the case of AnimationBackend this didn't work properly, as when the view is unmounted we would lose the ShadowNodeFamily shared_ptr that we hold and it could get deallocated. Since now we can get an owning reference to ShadowNodeFamily from ShadowNode::getFamilyShared, we don't have to keep this old unsafe api. Instead we require the caller to have an owning reference with the api itself. This `cloneMultiple` method isn't really adopted in the community, so the breaking change shouldn't be a big problem. Reviewed By: zeyap, javache Differential Revision: D93596770
37d37ce to
8e5de46
Compare
|
This pull request was successfully merged by @coado in 8e5de46 When will my fix make it into a release? | How to file a pick request? |
Job Summary for GradleTest All :: build_android
|
Job Summary for GradleTest All :: run_fantom_tests
|
Job Summary for GradleTest All :: run_fantom_tests
|
Summary: The cloneMultiple method was written in a way to accept a list of families that are presumed to be owned by the api caller. This designe was mostly aimed at reanimated, that holds refernces to ShadowNodes (that own these families). In the case of AnimationBackend this didn't work properly, as when the view is unmounted we would lose the ShadowNodeFamily shared_ptr that we hold and it could get deallocated. Since now we can get an owning reference to ShadowNodeFamily from ShadowNode::getFamilyShared, we don't have to keep this old unsafe api. Instead we require the caller to have an owning reference with the api itself. This `cloneMultiple` method isn't really adopted in the community, so the breaking change shouldn't be a big problem. Reviewed By: zeyap, javache Differential Revision: D93596770
8e5de46 to
dfffda3
Compare
Job Summary for GradleTest All :: build_android
|
Summary: Pull Request resolved: #55613 The cloneMultiple method was written in a way to accept a list of families that are presumed to be owned by the api caller. This designe was mostly aimed at reanimated, that holds refernces to ShadowNodes (that own these families). In the case of AnimationBackend this didn't work properly, as when the view is unmounted we would lose the ShadowNodeFamily shared_ptr that we hold and it could get deallocated. Since now we can get an owning reference to ShadowNodeFamily from ShadowNode::getFamilyShared, we don't have to keep this old unsafe api. Instead we require the caller to have an owning reference with the api itself. This `cloneMultiple` method isn't really adopted in the community, so the breaking change shouldn't be a big problem. Reviewed By: zeyap, javache Differential Revision: D93596770
dfffda3 to
f102dbe
Compare
|
This pull request was successfully merged by @coado in f102dbe When will my fix make it into a release? | How to file a pick request? |
Job Summary for GradleTest All :: build_android
|
Summary: Pull Request resolved: #55613 The cloneMultiple method was written in a way to accept a list of families that are presumed to be owned by the api caller. This designe was mostly aimed at reanimated, that holds refernces to ShadowNodes (that own these families). In the case of AnimationBackend this didn't work properly, as when the view is unmounted we would lose the ShadowNodeFamily shared_ptr that we hold and it could get deallocated. Since now we can get an owning reference to ShadowNodeFamily from ShadowNode::getFamilyShared, we don't have to keep this old unsafe api. Instead we require the caller to have an owning reference with the api itself. This `cloneMultiple` method isn't really adopted in the community, so the breaking change shouldn't be a big problem. Reviewed By: zeyap, javache Differential Revision: D93596770
f102dbe to
6675f95
Compare
|
This pull request was successfully merged by @coado in 6675f95 When will my fix make it into a release? | How to file a pick request? |
Job Summary for GradleTest All :: build_android
|
Job Summary for GradleTest All :: run_fantom_tests
|
Job Summary for GradleTest All :: run_fantom_tests
|
Job Summary for GradleTest All :: run_fantom_tests
|
Summary: The cloneMultiple method was written in a way to accept a list of families that are presumed to be owned by the api caller. This designe was mostly aimed at reanimated, that holds refernces to ShadowNodes (that own these families). In the case of AnimationBackend this didn't work properly, as when the view is unmounted we would lose the ShadowNodeFamily shared_ptr that we hold and it could get deallocated. Since now we can get an owning reference to ShadowNodeFamily from ShadowNode::getFamilyShared, we don't have to keep this old unsafe api. Instead we require the caller to have an owning reference with the api itself. This `cloneMultiple` method isn't really adopted in the community, so the breaking change shouldn't be a big problem. Reviewed By: zeyap, javache Differential Revision: D93596770
6675f95 to
c66970c
Compare
Summary: Pull Request resolved: #55613 The cloneMultiple method was written in a way to accept a list of families that are presumed to be owned by the api caller. This designe was mostly aimed at reanimated, that holds refernces to ShadowNodes (that own these families). In the case of AnimationBackend this didn't work properly, as when the view is unmounted we would lose the ShadowNodeFamily shared_ptr that we hold and it could get deallocated. Since now we can get an owning reference to ShadowNodeFamily from ShadowNode::getFamilyShared, we don't have to keep this old unsafe api. Instead we require the caller to have an owning reference with the api itself. This `cloneMultiple` method isn't really adopted in the community, so the breaking change shouldn't be a big problem. Reviewed By: zeyap, javache Differential Revision: D93596770
c66970c to
639c289
Compare
|
This pull request was successfully merged by @coado in 639c289 When will my fix make it into a release? | How to file a pick request? |
Summary: Pull Request resolved: #55613 The cloneMultiple method was written in a way to accept a list of families that are presumed to be owned by the api caller. This designe was mostly aimed at reanimated, that holds refernces to ShadowNodes (that own these families). In the case of AnimationBackend this didn't work properly, as when the view is unmounted we would lose the ShadowNodeFamily shared_ptr that we hold and it could get deallocated. Since now we can get an owning reference to ShadowNodeFamily from ShadowNode::getFamilyShared, we don't have to keep this old unsafe api. Instead we require the caller to have an owning reference with the api itself. This `cloneMultiple` method isn't really adopted in the community, so the breaking change shouldn't be a big problem. Reviewed By: zeyap, javache Differential Revision: D93596770
639c289 to
41f59c4
Compare
|
This pull request was successfully merged by @coado in 41f59c4 When will my fix make it into a release? | How to file a pick request? |
|
This pull request was successfully merged by @coado in 1d47693 When will my fix make it into a release? | How to file a pick request? |
Summary: Pull Request resolved: #55613 The cloneMultiple method was written in a way to accept a list of families that are presumed to be owned by the api caller. This designe was mostly aimed at reanimated, that holds refernces to ShadowNodes (that own these families). In the case of AnimationBackend this didn't work properly, as when the view is unmounted we would lose the ShadowNodeFamily shared_ptr that we hold and it could get deallocated. Since now we can get an owning reference to ShadowNodeFamily from ShadowNode::getFamilyShared, we don't have to keep this old unsafe api. Instead we require the caller to have an owning reference with the api itself. This `cloneMultiple` method isn't really adopted in the community, so the breaking change shouldn't be a big problem. Changelog: [General][Breaking] - fix unsafe rawPointer access in cloneMultiple. Reviewed By: zeyap, javache Differential Revision: D93596770 fbshipit-source-id: c4d99b51875968ebce50358c19502cba02c50685
Summary: Pull Request resolved: facebook#55613 The cloneMultiple method was written in a way to accept a list of families that are presumed to be owned by the api caller. This designe was mostly aimed at reanimated, that holds refernces to ShadowNodes (that own these families). In the case of AnimationBackend this didn't work properly, as when the view is unmounted we would lose the ShadowNodeFamily shared_ptr that we hold and it could get deallocated. Since now we can get an owning reference to ShadowNodeFamily from ShadowNode::getFamilyShared, we don't have to keep this old unsafe api. Instead we require the caller to have an owning reference with the api itself. This `cloneMultiple` method isn't really adopted in the community, so the breaking change shouldn't be a big problem. Changelog: [General][Breaking] - fix unsafe rawPointer access in cloneMultiple. Reviewed By: zeyap, javache Differential Revision: D93596770 fbshipit-source-id: c4d99b51875968ebce50358c19502cba02c50685
Summary:
The cloneMultiple method was written in a way to accept a list of families that are presumed to be owned by the api caller. This designe was mostly aimed at reanimated, that holds refernces to ShadowNodes (that own these families). In the case of AnimationBackend this didn't work properly, as when the view is unmounted we would lose the ShadowNodeFamily shared_ptr that we hold and it could get deallocated.
Since now we can get an owning reference to ShadowNodeFamily from ShadowNode::getFamilyShared, we don't have to keep this old unsafe api. Instead we require the caller to have an owning reference with the api itself.
This
cloneMultiplemethod isn't really adopted in the community, so the breaking change shouldn't be a big problem.Changelog:
[General][Breaking] - fix unsafe rawPointer access in cloneMultiple.
Differential Revision: D93596770